<?
class Ticket extends genericClass {
  function Save()
  {
	//echo "okokokok";
    if ($this->Code=="")
      {
    $before_line = $GLOBALS['Systeme']->Modules["Tickets"]->callData("Tickets/Ticket","",0,1000000,"","","MAX(Id)");
    $before_line = $before_line[0]["MAX(Id)"];
    $file_ref = fopen("../Codes/mdp_unsort.bdd","r");
    $line = 0;
    for ($i = $line;$i<$before_line;$i++)
      {
	fgets($file_ref);
	$line++;
      }
    $code = fgets($file_ref);
    $this->Set("Code",$code);
    $this->Code = $code;
      }
    return genericClass::Save();
  }
}
?>